package com.macgoo.game.dal;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class EMF {

	private static final EntityManagerFactory emfInstance = Persistence
			.createEntityManagerFactory("transactions-optional-emf");
	
	public EMF() {
	}

	public static EntityManager getNewEntityManager() {
		return emfInstance.createEntityManager();
	}
	
	public static EntityManagerFactory entityManager() {
		return emfInstance;
	}
}
